//
//  DEZLocation.m
//  LinLiSheQu
//
//  Created by zhanghailong on 2018/5/23.
//  Copyright © 2018年 KuoShuChing. All rights reserved.
//

#import "DEZLocation.h"

@implementation DEZLocation

+ (void)getCurrentPosition
{
//    DEZLocation *zlocation = [[DEZLocation alloc] init];
//    AMapLocationManager *manager = [[AMapLocationManager alloc] init];
//    manager.delegate = zlocation;
//    manager.desiredAccuracy = kCLLocationAccuracyBest;
//    manager.distanceFilter = kCLLocationAccuracyBest;
//    [manager requestLocationWithReGeocode:YES completionBlock:^(CLLocation *location, AMapLocationReGeocode *regeocode, NSError *error) {
//
//        [[NSUserDefaults standardUserDefaults] setObject:[NSString stringWithFormat:@"%f",location.coordinate.latitude] forKey:@"latitude"];
//        [[NSUserDefaults standardUserDefaults] setObject:[NSString stringWithFormat:@"%f",location.coordinate.longitude] forKey:@"longitude"];
//        [[NSUserDefaults standardUserDefaults] synchronize];
//    }];
}
//-(void)amapLocationManager:(AMapLocationManager *)manager didUpdateLocation:(CLLocation *)location
//{
//    [[NSUserDefaults standardUserDefaults] setObject:[NSString stringWithFormat:@"%f",location.coordinate.latitude] forKey:@"latitude"];
//    [[NSUserDefaults standardUserDefaults] setObject:[NSString stringWithFormat:@"%f",location.coordinate.longitude] forKey:@"longitude"];
//    [[NSUserDefaults standardUserDefaults] synchronize];
//}

//-(void)mapView:(MAMapView *)mapView didUpdateUserLocation:(MAUserLocation *)userLocation updatingLocation:(BOOL)updatingLocation
//{
//    if(updatingLocation)
//    {
//        //取出当前位置的坐标
//        //NSLog(@"latitude : %f,longitude: %f",user Location.coordinate.latitude,userLocation.coordinate.longitude);
//        self.lat = userLocation.coordinate.latitude;
//        self.lon = userLocation.coordinate.longitude;
//    }
//}


@end
